<?php
if($_SERVER['REQUEST_METHOD']=='DELETE'){
	try {
		parse_str(file_get_contents("php://input"), $formData);
		Article::instance()->del($formData['id']);
		echo json_encode(array('success'=> true));
	} catch(Exception $ex) {
		echo json_encode(array('error'=> array(
            'code'=> $ex->getCode(),
            'message'=> $ex->getMessage()
        )));
		throw $ex;
	}
}